n=5
ans=[]
for i in range(0,n+1):
    x=0
    m=list(bin(i)[2:])
    for i in m:
        if i == '1':
            x+=1
    ans.append(x)
print(ans)